package com.example.tupu.repository;

import com.example.tupu.relationship.ReEvent;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface ReEventRepository extends Neo4jRepository<ReEvent,Long> {

    @Query(" match (n)-[d:INCIDENT_IN]->(m:Event) where m.title=$title return d")
    ReEvent findIncident(String title);
}
